/*
 * @Date: 2025-04-21 11:11:20
 * @LastEditors: Csir 2215995096@qq.com
 * @LastEditTime: 2025-07-17 13:26:51
 * @FilePath: \infomng-ui\src\api\common.js
 */
import request from "@/router/axios";

// 产线
export function lineList(data) {
  return request({
    url: "/admin-api/o3-pfoc/realityproductlinemain/page",
    method: "get",
    params: data,
  });
}
// 车间
export function workshop() {
  return request({
    url: "/admin-api/o3-pfoc/workshop/page",
    method: "get",
  });
}

// 工位
export function getWorkPositionList(data) {
  return request({
    url: "/admin-api/o3-pfoc/workposition/getWorkPositionList",
    method: "get",
    params: data,
  });
}

// 工序
export function getPfocProcessList() {
  return request({
    url: "/admin-api/o3-pfoc/pfocprocess/getPfocProcessList",
    method: "get",
  });
}

// 工序集合--大屏-关键工序不良率
export function getPfocProcessLargeList() {
  return request({
    url: "/admin-api/o3-pfoc/pfocprocess/getPfocProcessLargeList",
    method: "get",
  });
}

// 车间--查询品号所属车间
export function workshopListByItemCode(itemCode) {
  return request({
    url:
      "/admin-api/o3-pfoc/realityproductlinemain/getWorkshopListByItemCode?itemCode=" +
      itemCode,
    method: "get",
  });
}

// 产线--查询车间+品号所属产线
export function lineListByWorkshopId(data) {
  return request({
    url: "/admin-api/o3-pfoc/realityproductlinemain/getLineListByWorkshopId",
    method: "get",
    params: data,
  });
}
